<?php

namespace Boosen\Admin\Contents;

use Illuminate\Support\ServiceProvider;

class ContentsServiceProvider extends ServiceProvider
{
    /**
     * {@inheritdoc}
     */
    public function boot()
    {
    	$this->publishes([
	        __DIR__.'/../config/contents.php' => config_path('Boosen' .DIRECTORY_SEPARATOR . 'contents.php'),
           __DIR__.'/../public/wangEditor-3.1.1' => public_path('vendor/wangEditor-3.1.1'),
           __DIR__.'/../public/wang-editor.blade.php' => resource_path('views/admin/wang-editor.blade.php'),
           __DIR__.'/../public/wangEditor.php' => admin_path('Extensions/Form/WangEditor.php'),
           __DIR__.'/../lang/zh_CN/contents.php' => resource_path('lang/zh-CN/contents.php'),
	       __DIR__.'/../lang/en/contents.php' => resource_path('lang/en/contents.php')
        ]);

        $this->loadMigrationsFrom(__DIR__.'/../database/migrations');
        // $this->loadViewsFrom(__DIR__.'/../resources/views', 'boosen-menus');
        $this->loadHelpers();
        Contents::boot();
    }

    public function loadHelpers()
    {
        require_once __DIR__.'/helpers.php';
    }
}
